# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=libgepub
pkgver=0.5.2
pkgrel=1
pkgdesc="Simple library to read epub files using glib"
url="https://git.gnome.org/browse/libgepub"
arch=(i686 x86_64)
license=(LGPL)
depends=(webkit2gtk libarchive)
makedepends=(git gtk-doc gobject-introspection meson)
_commit=5a11b8cf296712ed27d5aa7c19ed2862ee4ffcf3  # tags/0.5.2^0
source=("git+https://git.gnome.org/browse/libgepub#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  mkdir build
  cd $pkgname
}

build() {
  cd build
  meson --prefix=/usr --buildtype=release ../$pkgname
  ninja
}

check() {
  cd build
  mesontest
}

package() {
  cd build
  DESTDIR="$pkgdir" ninja install
}
